﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Hasiu.Mvc.ViewModels.SlideViewModel>" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Index</title>
    <link href="/css/zhx.css" rel="stylesheet" type="text/css" />
    <script src="/js/zhx.js" type="text/javascript"></script>
</head>
<body>
    <table class="table_grid">
        <tr class="header">
            <td>图片</td>
            <td>标题</td>
            <td>链接地址</td>
            <td>删除</td>
        </tr>
        <% 
            foreach (var v in Model.GetSlideList)
            { 
        %>
        <tr>
            <td><a href="/admin/slide.aspx?id=<%= v.Id %>"><img src="<%= v.Img %>" class="imageZoom" height="25px" /></a></td>
            <td><%= v.Title %></td>
            <td><%= v.Url %></td>
            <td><a href="/admin/slide/del.aspx?id=<%= v.Id %>" class="tssc" title="删除">X</a></td>
        </tr>
        <%
            }
        %>
    </table>
    <form class="yz" action="" method="post">
        <table class="table_frame">
            <tr class="header">
                <td colspan="100">
                    <%= Model.GetSlide == null ? "添加幻灯片" : "修改幻灯片 <a href='/admin/slide.aspx'/>返回添加幻灯片</a>"%>
                </td>
            </tr>
            <tr>
                <td>图片</td>
                <td>
                    <input type="text" name="Img" value="<%= Model.GetSlide == null ? "" : Model.GetSlide.Img %>" id="Img" cutImg="400,300" class="{required:true}"  />
                </td>
            </tr>
            <tr>
                <td>标题/说明</td>
                <td>
                    <input type="text" name="Title" style="width:250px;" value="<%= Model.GetSlide == null ? "" : Model.GetSlide.Title %>" />
                </td>
            </tr>
            <tr>
                <td>链接地址</td>
                <td>
                    <input type="text" name="Url" style="width:250px;" value="<%= Model.GetSlide == null ? "" : Model.GetSlide.Url %>" class="{url:true}" />
                </td>
            </tr>
            <tr class="footer">
                <td colspan="100">
                    <input class="btnSave" type="submit" value="保存" />
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
